package com.ticket.sass.common.ticketserver.platform.fhyz

import org.springframework.util.DigestUtils

class Configurer {
    enum class Env(val url: String) {
        DEV("http://lark-mcop-pre.yuekeyun.com/route2"),
        ONLINE("http://mcop-lark.yuekeyun.com/route2")
    }

    companion object {
        fun generateTicketSign(secretKey: String, params: List<Map<String, Any?>>): String {
            val info = params.sortedBy { it.keys.first() }.joinToString("") {
                it.keys.first() + it.values.first()
            } + secretKey

            return DigestUtils.md5DigestAsHex(info.toByteArray())
        }
    }
}